***** ISO3 TO CORRELATES OF WAR CODES *****
* Derived from the work of Andreas Beger (2006) - https://www.andybeger.com/blog/2013-09-05-stata-do-files-for-country-code-conversions/

replace ccode=  2 if sanctioned_state_iso3=="USA"
replace ccode= 20 if sanctioned_state_iso3=="CAN"
replace ccode= 31 if sanctioned_state_iso3=="BHS"
replace ccode= 40 if sanctioned_state_iso3=="CUB"
replace ccode= 41 if sanctioned_state_iso3=="HTI"
replace ccode= 42 if sanctioned_state_iso3=="DOM"
replace ccode= 51 if sanctioned_state_iso3=="JAM"
replace ccode= 52 if sanctioned_state_iso3=="TTO"
replace ccode= 53 if sanctioned_state_iso3=="BRB"
replace ccode= 54 if sanctioned_state_iso3=="DMA"
replace ccode= 55 if sanctioned_state_iso3=="GRN"
replace ccode= 56 if sanctioned_state_iso3=="SLU"
replace ccode= 57 if sanctioned_state_iso3=="SVG"
replace ccode= 58 if sanctioned_state_iso3=="AAB"
replace ccode= 60 if sanctioned_state_iso3=="SKN"
replace ccode= 70 if sanctioned_state_iso3=="MEX"
replace ccode= 80 if sanctioned_state_iso3=="BLZ"
replace ccode= 90 if sanctioned_state_iso3=="GTM"
replace ccode= 91 if sanctioned_state_iso3=="HND"
replace ccode= 92 if sanctioned_state_iso3=="SLV"
replace ccode= 93 if sanctioned_state_iso3=="NIC"
replace ccode= 94 if sanctioned_state_iso3=="COS"
replace ccode= 95 if sanctioned_state_iso3=="PAN"
replace ccode=100 if sanctioned_state_iso3=="COL"
replace ccode=101 if sanctioned_state_iso3=="VEN"
replace ccode=110 if sanctioned_state_iso3=="GUY"
replace ccode=115 if sanctioned_state_iso3=="SUR"
replace ccode=130 if sanctioned_state_iso3=="ECU"
replace ccode=135 if sanctioned_state_iso3=="PER"
replace ccode=140 if sanctioned_state_iso3=="BRA"
replace ccode=145 if sanctioned_state_iso3=="BOL"
replace ccode=150 if sanctioned_state_iso3=="PAR"
replace ccode=155 if sanctioned_state_iso3=="CHL"
replace ccode=160 if sanctioned_state_iso3=="ARG"
replace ccode=165 if sanctioned_state_iso3=="URU"
replace ccode=200 if sanctioned_state_iso3=="GBR"
replace ccode=205 if sanctioned_state_iso3=="IRE"
replace ccode=210 if sanctioned_state_iso3=="NTH"
replace ccode=211 if sanctioned_state_iso3=="BEL"
replace ccode=212 if sanctioned_state_iso3=="LUX"
replace ccode=220 if sanctioned_state_iso3=="FRA"
replace ccode=221 if sanctioned_state_iso3=="MNC"
replace ccode=223 if sanctioned_state_iso3=="LIE"
replace ccode=225 if sanctioned_state_iso3=="CHE"
replace ccode=230 if sanctioned_state_iso3=="ESP"
replace ccode=232 if sanctioned_state_iso3=="AND"
replace ccode=235 if sanctioned_state_iso3=="PRT"
replace ccode=255 if sanctioned_state_iso3=="DEU"
replace ccode=260 if (sanctioned_state_iso3=="DEU" & year<=1990)
replace ccode=265 if sanctioned_state_iso3=="DDR"
replace ccode=290 if sanctioned_state_iso3=="POL"
replace ccode=305 if sanctioned_state_iso3=="AUT"
replace ccode=310 if sanctioned_state_iso3=="HUN"
replace ccode=315 if sanctioned_state_iso3=="CSK"
replace ccode=316 if sanctioned_state_iso3=="CZE"
replace ccode=317 if sanctioned_state_iso3=="SVK"
replace ccode=325 if sanctioned_state_iso3=="ITA"
replace ccode=331 if sanctioned_state_iso3=="SMR"
replace ccode=338 if sanctioned_state_iso3=="MLT"
replace ccode=339 if sanctioned_state_iso3=="ALB"
replace ccode=341 if sanctioned_state_iso3=="MNE" & year > 2006
replace ccode=343 if sanctioned_state_iso3=="MKD"
replace ccode=344 if sanctioned_state_iso3=="HRV"
replace ccode=345 if sanctioned_state_iso3=="YUG"
replace ccode=345 if sanctioned_state_iso3=="SRB"
replace ccode=345 if sanctioned_state_iso3=="MNE" & year <= 2006
replace ccode=346 if sanctioned_state_iso3=="BIH"
replace ccode=347 if sanctioned_state_iso3=="XKX"
replace ccode=349 if sanctioned_state_iso3=="SVN"
replace ccode=350 if sanctioned_state_iso3=="GRC"
replace ccode=352 if sanctioned_state_iso3=="CYP"
replace ccode=355 if sanctioned_state_iso3=="BGR"
replace ccode=359 if sanctioned_state_iso3=="MDA"
replace ccode=360 if sanctioned_state_iso3=="ROU"
replace ccode=365 if sanctioned_state_iso3=="RUS"
replace ccode=365 if sanctioned_state_iso3=="SUN"
replace ccode=366 if sanctioned_state_iso3=="EST"
replace ccode=367 if sanctioned_state_iso3=="LVA"
replace ccode=368 if sanctioned_state_iso3=="LTU"
replace ccode=369 if sanctioned_state_iso3=="UKR"
replace ccode=370 if sanctioned_state_iso3=="BLR"
replace ccode=371 if sanctioned_state_iso3=="ARM"
replace ccode=372 if sanctioned_state_iso3=="GEO"
replace ccode=373 if sanctioned_state_iso3=="AZE"
replace ccode=375 if sanctioned_state_iso3=="FIN"
replace ccode=380 if sanctioned_state_iso3=="SWE"
replace ccode=385 if sanctioned_state_iso3=="NOR"
replace ccode=390 if sanctioned_state_iso3=="DNK"
replace ccode=395 if sanctioned_state_iso3=="ISL"
replace ccode=402 if sanctioned_state_iso3=="CPV"
replace ccode=403 if sanctioned_state_iso3=="STP"
replace ccode=404 if sanctioned_state_iso3=="GNB"
replace ccode=411 if sanctioned_state_iso3=="GNQ"
replace ccode=420 if sanctioned_state_iso3=="GMB"
replace ccode=432 if sanctioned_state_iso3=="MLI"
replace ccode=433 if sanctioned_state_iso3=="SEN"
replace ccode=434 if sanctioned_state_iso3=="BEN"
replace ccode=435 if sanctioned_state_iso3=="MRT"
replace ccode=436 if sanctioned_state_iso3=="NER"
replace ccode=437 if sanctioned_state_iso3=="CIV"
replace ccode=438 if sanctioned_state_iso3=="GIN"
replace ccode=439 if sanctioned_state_iso3=="BFA"
replace ccode=450 if sanctioned_state_iso3=="LBR"
replace ccode=451 if sanctioned_state_iso3=="SLE"
replace ccode=452 if sanctioned_state_iso3=="GHA"
replace ccode=461 if sanctioned_state_iso3=="TGO"
replace ccode=471 if sanctioned_state_iso3=="CMR"
replace ccode=475 if sanctioned_state_iso3=="NGA"
replace ccode=481 if sanctioned_state_iso3=="GAB"
replace ccode=482 if sanctioned_state_iso3=="CAF"
replace ccode=483 if sanctioned_state_iso3=="TCD"
replace ccode=484 if sanctioned_state_iso3=="COG"
replace ccode=490 if sanctioned_state_iso3=="COD"
replace ccode=500 if sanctioned_state_iso3=="UGA"
replace ccode=501 if sanctioned_state_iso3=="KEN"
replace ccode=510 if sanctioned_state_iso3=="TZA"
replace ccode=511 if sanctioned_state_iso3=="EAZ"
replace ccode=516 if sanctioned_state_iso3=="BDI"
replace ccode=517 if sanctioned_state_iso3=="RWA"
replace ccode=520 if sanctioned_state_iso3=="SOM"
replace ccode=522 if sanctioned_state_iso3=="DJI"
replace ccode=530 if sanctioned_state_iso3=="ETH"
replace ccode=531 if sanctioned_state_iso3=="ERI"
replace ccode=540 if sanctioned_state_iso3=="AGO"
replace ccode=541 if sanctioned_state_iso3=="MOZ"
replace ccode=551 if sanctioned_state_iso3=="ZMB"
replace ccode=552 if sanctioned_state_iso3=="ZWE"
replace ccode=552 if sanctioned_state_iso3=="RHO"
replace ccode=553 if sanctioned_state_iso3=="MWI"
replace ccode=560 if sanctioned_state_iso3=="ZAF"
replace ccode=565 if sanctioned_state_iso3=="NAM"
replace ccode=570 if sanctioned_state_iso3=="LSO"
replace ccode=571 if sanctioned_state_iso3=="BWA"
replace ccode=572 if sanctioned_state_iso3=="SWZ"
replace ccode=580 if sanctioned_state_iso3=="MDG"
replace ccode=581 if sanctioned_state_iso3=="COM"
replace ccode=590 if sanctioned_state_iso3=="MUS"
replace ccode=591 if sanctioned_state_iso3=="SYC"
replace ccode=600 if sanctioned_state_iso3=="MAR"
replace ccode=615 if sanctioned_state_iso3=="DZA"
replace ccode=616 if sanctioned_state_iso3=="TUN"
replace ccode=620 if sanctioned_state_iso3=="LBY"
replace ccode=625 if sanctioned_state_iso3=="SDN"
replace ccode=626 if sanctioned_state_iso3=="SSD"
replace ccode=630 if sanctioned_state_iso3=="IRN"
replace ccode=640 if sanctioned_state_iso3=="TUR"
replace ccode=645 if sanctioned_state_iso3=="IRQ"
replace ccode=651 if sanctioned_state_iso3=="EGY"
replace ccode=652 if sanctioned_state_iso3=="SYR"
replace ccode=660 if sanctioned_state_iso3=="LBN"
replace ccode=663 if sanctioned_state_iso3=="JOR"
replace ccode=666 if sanctioned_state_iso3=="ISR"
replace ccode=670 if sanctioned_state_iso3=="SAU"
replace ccode=678 if sanctioned_state_iso3=="YEM" & year < 1990 //north yemen
replace ccode=679 if sanctioned_state_iso3=="YEM" & year >= 1990 //current yemen
replace ccode=680 if sanctioned_state_iso3=="YMD" //south yemen
replace ccode=690 if sanctioned_state_iso3=="KWT"
replace ccode=692 if sanctioned_state_iso3=="BHR"
replace ccode=694 if sanctioned_state_iso3=="QAT"
replace ccode=696 if sanctioned_state_iso3=="ARE"
replace ccode=698 if sanctioned_state_iso3=="OMN"
replace ccode=700 if sanctioned_state_iso3=="AFG"
replace ccode=701 if sanctioned_state_iso3=="TKM"
replace ccode=702 if sanctioned_state_iso3=="TJK"
replace ccode=703 if sanctioned_state_iso3=="KGZ"
replace ccode=704 if sanctioned_state_iso3=="UZB"
replace ccode=705 if sanctioned_state_iso3=="KAZ"
replace ccode=710 if sanctioned_state_iso3=="CHN"
replace ccode=712 if sanctioned_state_iso3=="MNG"
replace ccode=713 if sanctioned_state_iso3=="TWN"
replace ccode=731 if sanctioned_state_iso3=="PRK" //N KOREA
replace ccode=732 if sanctioned_state_iso3=="KOR" //S KOREA
replace ccode=740 if sanctioned_state_iso3=="JPN"
replace ccode=750 if sanctioned_state_iso3=="IND"
replace ccode=760 if sanctioned_state_iso3=="BTN"
replace ccode=770 if sanctioned_state_iso3=="PAK"
replace ccode=771 if sanctioned_state_iso3=="BGD"
replace ccode=775 if sanctioned_state_iso3=="MMR"
replace ccode=780 if sanctioned_state_iso3=="LKA"
replace ccode=781 if sanctioned_state_iso3=="MDV"
replace ccode=790 if sanctioned_state_iso3=="NPL"
replace ccode=800 if sanctioned_state_iso3=="THA"
replace ccode=811 if sanctioned_state_iso3=="KHM"
replace ccode=812 if sanctioned_state_iso3=="LAO"
replace ccode=816 if sanctioned_state_iso3=="VDR"
replace ccode=816 if sanctioned_state_iso3=="VNM"
replace ccode=820 if sanctioned_state_iso3=="MYS"
replace ccode=830 if sanctioned_state_iso3=="SGP"
replace ccode=835 if sanctioned_state_iso3=="BRN"
replace ccode=840 if sanctioned_state_iso3=="PHL"
replace ccode=850 if sanctioned_state_iso3=="IDN"
replace ccode=860 if sanctioned_state_iso3=="TLS"
replace ccode=860 if sanctioned_state_iso3=="TMP"
replace ccode=900 if sanctioned_state_iso3=="AUS"
replace ccode=910 if sanctioned_state_iso3=="PNG"
replace ccode=920 if sanctioned_state_iso3=="NZL"
replace ccode=935 if sanctioned_state_iso3=="VUT"
replace ccode=940 if sanctioned_state_iso3=="SLB"
replace ccode=946 if sanctioned_state_iso3=="KIR"
replace ccode=947 if sanctioned_state_iso3=="TUV"
replace ccode=950 if sanctioned_state_iso3=="FJI"
replace ccode=955 if sanctioned_state_iso3=="TON"
replace ccode=970 if sanctioned_state_iso3=="NRU"
replace ccode=983 if sanctioned_state_iso3=="MHL"
replace ccode=986 if sanctioned_state_iso3=="PLW"
replace ccode=987 if sanctioned_state_iso3=="FSM"
replace ccode=990 if sanctioned_state_iso3=="WSM"
